home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilgraf / newicndt.lha / NewIconDT / NewIconToILBM < prev   
AmigaDOS Script File  |  1996-10-25  |  2KB  |  74 lines

  1. .key FROM/A,TO/A,NOBORDER/S,NONORMAL/S,NOSELECTED/S,XOFFSET,YOFFSET,BORDERPEN,COLORMAP
  2. .bra {
  3. .ket }
  4.  
  5. ;-----------------------------------------------------------------------;
  6. ; NewIconToILBM
  7. ; ¯¯¯¯¯¯¯¯¯¯¯¯¯
  8. ; This script converts 'NewIcon' icons to IFF ILBM files.
  9. ; It uses the newicon.datatype and dt2iff.
  10. ;
  11. ; Made by Pascal Hurni the 24-Oct-96, part of the newicon.datatype archive
  12. ;-----------------------------------------------------------------------;
  13.  
  14. ;*** Using default ?
  15. IF "{NOBORDER}" EQ ""
  16. IF "{NONORMAL}" EQ ""
  17. IF "{NOSELECTED}" EQ ""
  18. IF "{XOFFSET}" EQ ""
  19. IF "{YOFFSET}" EQ ""
  20. IF "{BORDERPEN}" EQ ""
  21. IF "{COLORMAP}" EQ ""
  22.   ;*** We are using the default prefs file, do the job
  23.  
  24.   ;*** Do the conversion with DT2IFF
  25.   DT2IFF {FROM} {TO}
  26.  
  27.   ;*** That's all folks
  28.   Quit
  29.  
  30. ENDIF
  31. ENDIF
  32. ENDIF
  33. ENDIF
  34. ENDIF
  35. ENDIF
  36. ENDIF
  37.  
  38. ;*** We are using user options, let's generate the prefs file
  39.  
  40. FailAt 21
  41.  
  42. ;*** Create this directory if it doesn't exists, and create an empty prefs
  43. ;*** file as well
  44. IF NOT EXISTS ENV:DataTypes
  45.   MakeDir ENV:DataTypes
  46.   Echo >ENV:DataTypes/NewIcon.prefs ";Empty NewIcon.prefs file generated by NewIconToILBM"
  47. ENDIF
  48.  
  49. ;*** Save the old prefs (if it exists)
  50. Copy >NIL: ENV:DataTypes/NewIcon.prefs ENV:DataTypes/NewIcon.prefs.old
  51.  
  52. ;*** Creates the prefs file with the arguments
  53. Echo >ENV:DataTypes/NewIcon.prefs  "{NOBORDER} {NONORMAL} {NOSELECTED}"
  54. IF NOT "{XOFFSET}" EQ ""
  55.   Echo >>ENV:DataTypes/NewIcon.prefs "XOFFSET={XOFFSET}"
  56. ENDIF
  57. IF NOT "{YOFFSET}" EQ ""
  58.   Echo >>ENV:DataTypes/NewIcon.prefs "YOFFSET={YOFFSET}"
  59. ENDIF
  60. IF NOT "{BORDERPEN}" EQ ""
  61.   Echo >>ENV:DataTypes/NewIcon.prefs "BORDERPEN={BORDERPEN}"
  62. ENDIF
  63. IF NOT "{COLORMAP}" EQ ""
  64.   Echo >>ENV:DataTypes/NewIcon.prefs "COLORMAP={COLORMAP}"
  65. ENDIF
  66.  
  67. ;*** Do the conversion with DT2IFF
  68. DT2IFF {FROM} {TO}
  69.  
  70. ;*** Restore the old prefs
  71. Copy >NIL: ENV:DataTypes/NewIcon.prefs.old ENV:DataTypes/NewIcon.prefs
  72. Delete >NIL: ENV:DataTypes/NewIcon.prefs.old
  73.  
  74.